package com.ls.blog.vo;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ls.blog.entity.Category;
import com.ls.blog.entity.Tag;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @program: myblog
 * @author: lishun
 * @create: 2021-07-05 00:03
 **/

/**
 * 查询多个表将结果封装到这个对象中
 */
@Data
public class ArticleVo implements Serializable {

    //文章id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    // 文章标题
    private String title;

    // 文章概要
    private String summary;

    // 评论数量
    private Integer commentCounts;

    // 浏览量
    private Integer viewCounts;

    // 权重，实现置顶
    private Integer weight;

    // 创建时间
    private String createDate;

    // 作者
    private String author;
    // 文章内容
    private ArticleBodyVo articleBodyVo;
    // 标签
    private List<Tag> tags;
    // 分类
    private Category category;
    private String articleCover;

}
